<?php
/*! \brief
 * This is WFFixtures class
 * This is Fixtures class for unit test,
 * initial predefine data to /path/to/db/sqlite/tmwf_test.db before testing specific method,
 * destory predefine data from /path/to/db/sqlite/tmwf_test.db after testing specific method.
 * \author William Su
 */
require_once dirname(__FILE__) . '/Fixtures.abstract.php';
class WFFixtures extends AFixtures
{
    /**
     *\brief Description
     * initial predefine WIDGET data to /path/to/db/sqlite/tmwf_test.db by $assocsData
     */
    public function setUpWidgetByAssocsData($assocsData = null){
        parent::setUp('WIDGET', $assocsData);
    }
    /**
     *\brief Description
     * initial predefine WIDGET data to /path/to/db/sqlite/tmwf_test.db
     */
    public function setUpWidget(){
        //echo __FUNCTION__;
        $assocData['widget_id'] = '1';
        $assocData['widget_name'] = 'widget_name1';
        $assocData['modname'] = 'widget_name1';
        $assocData['widget_version'] = '1.0';
        $assocData['widget_version_float'] = '1.0';
        $assocData['widget_min_wf_version'] = '2.0';
        $assocData['widget_min_wf_version_float'] = '2.0';
        $assocData['widget_status'] = '1';
        $assocData['widget_status_update'] = '0';
        $assocData['user_generated'] = '0';
        $assocData['icon'] = 'wicon_table1.gif';
        $assocData['widget_key'] = '';
        $assocData['param'] = '';
        $assocData['createtime'] = strtotime('2010-11-02 10:00:00');
        $assocData['edittime'] = strtotime('2010-11-02 10:00:00');
        $this->appendAssocsData($assocData);
        $assocData['widget_id'] = '2';
        $assocData['widget_name'] = 'widget_name2';
        $assocData['modname'] = 'widget_name2';
        $assocData['widget_version'] = '1.0';
        $assocData['widget_version_float'] = '1.0';
        $assocData['widget_min_wf_version'] = '2.0';
        $assocData['widget_min_wf_version_float'] = '2.0';
        $assocData['widget_status'] = '1';
        $assocData['widget_status_update'] = '0';
        $assocData['user_generated'] = '0';
        $assocData['icon'] = 'wicon_table2.gif';
        $assocData['widget_key'] = '';
        $assocData['param'] = '';
        $assocData['createtime'] = strtotime('2010-11-02 11:00:00');
        $this->appendAssocsData($assocData);
        // widget status=off
        $assocData['widget_id'] = '3';
        $assocData['widget_name'] = 'widget_name3';
        $assocData['modname'] = 'widget_name3';
        $assocData['widget_version'] = '1.0';
        $assocData['widget_version_float'] = '1.0';
        $assocData['widget_min_wf_version'] = '2.0';
        $assocData['widget_min_wf_version_float'] = '2.0';
        $assocData['widget_status'] = '0';
        $assocData['widget_status_update'] = '0';
        $assocData['user_generated'] = '0';
        $assocData['icon'] = 'wicon_table2.gif';
        $assocData['widget_key'] = '';
        $assocData['param'] = '';
        $assocData['createtime'] = strtotime('2010-11-02 11:00:00');
        $assocData['edittime'] = strtotime(date('Y-m-d H:i:s', strtotime('-14 days')));
        $this->appendAssocsData($assocData);
        // widget_id 4,5,6 is reserve for QA test case
        $assocData['widget_id'] = '7';
        $assocData['widget_name'] = 'widget_name' . $assocData['widget_id'];
        $assocData['modname'] = 'widget_name789';
        $assocData['widget_version'] = '1.0';
        $assocData['widget_version_float'] = '1.0';
        $assocData['widget_min_wf_version'] = '2.0';
        $assocData['widget_min_wf_version_float'] = '2.0';
        $assocData['widget_status'] = '1';
        $assocData['widget_status_update'] = '0';
        $assocData['user_generated'] = '0';
        $assocData['icon'] = 'wicon_table2.gif';
        $assocData['widget_key'] = '1';
        $assocData['param'] = '';
        $assocData['createtime'] = strtotime('2010-11-02 11:00:00');
        $assocData['edittime'] = strtotime(date('Y-m-d H:i:s', strtotime('-13 days')));
        $this->appendAssocsData($assocData);
        $assocData['widget_id'] = '8';
        $assocData['widget_name'] = 'widget_name' . $assocData['widget_id'];
        $assocData['modname'] = 'widget_name789';
        $assocData['widget_version'] = '1.0';
        $assocData['widget_version_float'] = '1.0';
        $assocData['widget_min_wf_version'] = '2.0';
        $assocData['widget_min_wf_version_float'] = '2.0';
        $assocData['widget_status'] = '1';
        $assocData['widget_status_update'] = '0';
        $assocData['user_generated'] = '0';
        $assocData['icon'] = 'wicon_table2.gif';
        $assocData['widget_key'] = '2';
        $assocData['param'] = '';
        $assocData['createtime'] = strtotime('2010-11-02 11:00:00');
        $assocData['edittime'] = time();
        $this->appendAssocsData($assocData);
        $assocData['widget_id'] = '9';
        $assocData['widget_name'] = 'widget_name' . $assocData['widget_id'];
        $assocData['modname'] = 'widget_name789';
        $assocData['widget_version'] = '1.0';
        $assocData['widget_version_float'] = '1.0';
        $assocData['widget_min_wf_version'] = '2.0';
        $assocData['widget_min_wf_version_float'] = '2.0';
        $assocData['widget_status'] = '1';
        $assocData['widget_status_update'] = '0';
        $assocData['user_generated'] = '1';
        $assocData['icon'] = 'wicon_table2.gif';
        $assocData['widget_key'] = '3';
        $assocData['param'] = '';
        $assocData['createtime'] = strtotime('2010-11-02 11:00:00');
        $this->appendAssocsData($assocData);
        parent::setUp('WIDGET', $this->getAssocsData());
    }
    /**
     *\brief Description
     * destroy predefine WIDGET data from /path/to/db/sqlite/tmwf_test.db
     */
    public function tearDownWidget(){
        parent::tearDown('WIDGET');
    }
    /**
     *\brief Description
     * initial predefine WIDGET_CATEGORY data to /path/to/db/sqlite/tmwf_test.db by $assocsData
     */
    public function setUpWidgetCategoryByAssocsData($assocsData = null){
        parent::setUp('WIDGET_CATEGORY', $assocsData);
    }
    /**
     *\brief Description
     * initial predefine WIDGET_CATEGORY data to /path/to/db/sqlite/tmwf_test.db
     */
    public function setUpWidgetCategory(){
        $assocData['category_id'] = '1';
        $assocData['category_name'] = 'category_name1';
        $assocData['createtime'] = strtotime('2010-11-03 01:00:00');
        $this->appendAssocsData($assocData);
        $assocData['category_id'] = '2';
        $assocData['category_name'] = 'category_name2';
        $assocData['createtime'] = strtotime('2010-11-03 02:00:00');
        $this->appendAssocsData($assocData);
        // widget_id 3,4 is reserve for QA test case
        parent::setUp('WIDGET_CATEGORY', $this->getAssocsData());
    }
    /**
     *\brief Description
     * destroy predefine WIDGET_CATEGORY data from /path/to/db/sqlite/tmwf_test.db
     */
    public function tearDownWidgetCategory(){
        parent::tearDown('WIDGET_CATEGORY');
    }
    /**
     *\brief Description
     * initial predefine WIDGET_CATEGORY_MAPPING data to /path/to/db/sqlite/tmwf_test.db by $assocsData
     */
    public function setUpWidgetCategoryMappingByAssocsData($assocsData = null){
        parent::setUp('WIDGET_CATEGORY_MAPPING', $assocsData);
    }
    /**
     *\brief Description
     * initial predefine WIDGET_CATEGORY_MAPPING data to /path/to/db/sqlite/tmwf_test.db
     */
    public function setUpWidgetCategoryMapping(){
        //echo __FUNCTION__;
        $assocData['mapping_id'] = '1';
        $assocData['widget_id'] = '1';
        $assocData['category_id'] = '1';
        $assocData['min_support_version'] = '1.0';
        $assocData['min_support_version_float'] = '1.0';
        $assocData['createtime'] = strtotime('2010-11-03 01:00:00');
        $this->appendAssocsData($assocData);
        $assocData['mapping_id'] = '2';
        $assocData['widget_id'] = '1';
        $assocData['category_id'] = '2';
        $assocData['min_support_version'] = '1.5';
        $assocData['min_support_version_float'] = '1.5';
        $assocData['createtime'] = strtotime('2010-11-03 01:00:00');
        $this->appendAssocsData($assocData);
        $assocData['mapping_id'] = '3';
        $assocData['widget_id'] = '2';
        $assocData['category_id'] = '1';
        $assocData['min_support_version'] = '1.0';
        $assocData['min_support_version_float'] = '1.0';
        $assocData['createtime'] = strtotime('2010-11-03 02:00:00');
        $this->appendAssocsData($assocData);
        // widget status=off
        $assocData['mapping_id'] = '4';
        $assocData['widget_id'] = '3';
        $assocData['category_id'] = '1';
        $assocData['min_support_version'] = '1.0';
        $assocData['min_support_version_float'] = '1.0';
        $assocData['createtime'] = strtotime('2010-11-03 02:00:00');
        $this->appendAssocsData($assocData);
        // widget_id 5,6,7 is reserve for QA test case
        parent::setUp('WIDGET_CATEGORY_MAPPING', $this->getAssocsData());
    }
    /**
     *\brief Description
     * destroy predefine WIDGET_CATEGORY_MAPPING data from /path/to/db/sqlite/tmwf_test.db
     */
    public function tearDownWidgetCategoryMapping(){
        parent::tearDown('WIDGET_CATEGORY_MAPPING');
    }
    /**
     *\brief Description
     * initial predefine WP_UPDATE_FILTER data to /path/to/db/sqlite/tmwf_test.db by $assocsData
     */
    public function setUpWPUpdateFilterByAssocsData($assocsData = null){
        parent::setUp('WP_UPDATE_FILTER', $assocsData);
    }
    /**
     *\brief Description
     * initial predefine WP_UPDATE_FILTER data to /path/to/db/sqlite/tmwf_test.db
     */
    public function setUpWPUpdateFilter(){
        //echo __FUNCTION__;
        $assocData['filter_id'] = '1';
        $assocData['file_interface'] = 'turnOnWidgetOfCategoryByVersion.php';
        $assocData['filter_target'] = 'WidgetFramework';
        $assocData['filter_condition'] = '2.0';
        $assocData['createtime'] = strtotime('2010-11-02 10:13:50');
        $assocData['filter_key'] = $this->objWidgetPoolFactory->getWidgetPoolInterface()->getFilterKeyHashByMix($assocData);
        $this->appendAssocsData($assocData);
        $assocData['filter_id'] = '2';
        $assocData['file_interface'] = 'turnOnWidgetOfCategoryByVersion.php';
        $assocData['filter_target'] = 'IDF';
        $assocData['filter_condition'] = '2.0';
        $assocData['createtime'] = strtotime('2010-11-02 10:13:50');
        $assocData['filter_key'] = $this->objWidgetPoolFactory->getWidgetPoolInterface()->getFilterKeyHashByMix($assocData);
        $this->appendAssocsData($assocData);
        $assocData['filter_id'] = '3';
        $assocData['file_interface'] = 'turnOnWidgetOfCategoryByVersion.php';
        $assocData['filter_target'] = 'LSPN';
        $assocData['filter_condition'] = '1.0';
        $assocData['filter_key'] = $this->objWidgetPoolFactory->getWidgetPoolInterface()->getFilterKeyHashByMix($assocData);
        $this->appendAssocsData($assocData);
        parent::setUp('WP_UPDATE_FILTER', $this->getAssocsData());
    }
    /**
     *\brief Description
     * destroy predefine WP_UPDATE_FILTER data from /path/to/db/sqlite/tmwf_test.db
     */
    public function tearDownWPUpdateFilter(){
        parent::tearDown('WP_UPDATE_FILTER');
    }
    /**
     *\brief Description
     * initial predefine WP_UPDATE_LOG data to /path/to/db/sqlite/tmwf_test.db by $assocsData
     */
    public function setUpWPUpdateLogByAssocsData($assocsData = null){
        parent::setUp('WP_UPDATE_LOG', $assocsData);
    }
    /**
     *\brief Description
     * initial predefine WP_UPDATE_LOG data to /path/to/db/sqlite/tmwf_test.db
     */
    public function setUpWPUpdateLog(){
        $assocData['log_id'] = '1';
        $assocData['status'] = '1';
        $assocData['createtime'] = strtotime('2010-11-10 10:13:50');
        $this->appendAssocsData($assocData);
        $assocData['log_id'] = '2';
        $assocData['status'] = '2';
        $assocData['fail_point'] = '200';
        $assocData['createtime'] = strtotime('2010-11-10 11:13:50');
        $this->appendAssocsData($assocData);
        $assocData['log_id'] = '3';
        $assocData['status'] = '1';
        $assocData['createtime'] = strtotime('2010-11-10 12:13:50');
        $this->appendAssocsData($assocData);
        $assocData['log_id'] = '4';
        $assocData['status'] = '1';
        $assocData['createtime'] = strtotime('2010-11-10 12:13:50');
        $this->appendAssocsData($assocData);
        $assocData['log_id'] = '5';
        $assocData['status'] = '1';
        $assocData['before_update_widgets'] = '{"1":{"widget_id":"1","widget_version":"1.0","widget_status":"1"},"2":{"widget_id":"2","widget_version":"1.0","widget_status":"1"},"3":{"widget_id":"3","widget_version":"1.0","widget_status":"0"},"7":{"widget_id":"7","widget_version":"1.0","widget_status":"1"},"8":{"widget_id":"8","widget_version":"1.0","widget_status":"1"},"9":{"widget_id":"9","widget_version":"1.0","widget_status":"1"}}';
        $assocData['createtime'] = strtotime('2010-11-10 12:13:50');
        $this->appendAssocsData($assocData);
        parent::setUp('WP_UPDATE_LOG', $this->getAssocsData());
    }
    /**
     *\brief Description
     * destroy predefine WP_UPDATE_LOG data from /path/to/db/sqlite/tmwf_test.db
     */
    public function tearDownWPUpdateLog(){
        parent::tearDown('WP_UPDATE_LOG');
    }
    /**
     *\brief Description
     * initial predefine users data to /path/to/db/sqlite/tmwf_test.db
     */
    public function setUpUsers(){
        $assocData['id'] = '1';
        $assocData['email'] = 'trend@root';
        $assocData['pass'] = '';
        $assocData['data'] = '';
        $assocData['cdata'] = '';
        $assocData['udata'] = '[';
        $assocData['udata'] .= '{"modname":"widget_name1","column":0,"wid":1,"page":"1","order":1,"widget_key":null},';
        $assocData['udata'] .= '{"modname":"widget_name2","column":0,"wid":2,"page":"1","order":2,"widget_key":null},';
        $assocData['udata'] .= '{"modname":"widget_name789","column":0,"wid":3,"page":"1","order":3,"widget_key":1},';
        $assocData['udata'] .= '{"modname":"widget_name789","column":0,"wid":4,"page":"1","order":4,"widget_key":2},';
        $assocData['udata'] .= '{"modname":"widget_name789","column":0,"wid":5,"page":"1","order":5,"widget_key":3}';
        $assocData['udata'] .= ']';
        $assocData['pdata'] = '[{"sqeuenceNumber":1,"pageName":"Page 1","layout":"1","pageNumber":1,"boxWidth":"","autoFit":1}]';
        $assocData['lang'] = 'en_US';
        $assocData['theme'] = 'default';
        $this->appendAssocsData($assocData);
        
        $assocData['id'] = '2';
        $assocData['email'] = 'trend@root2';
        $assocData['pass'] = '';
        $assocData['data'] = '';
        $assocData['cdata'] = '[{"container_id":1,"container_name":"newPolicy","container_param":{"serverList":false,"help":false,"tabSettings":false,"addWidgets":false,"tab":false,"addTab":false},"container_type_name":2},{"container_id":3,"container_name":"dashBoard","container_param":{"serverList":true,"help":true,"tabSettings":true,"addWidgets":true,"tab":true,"addTab":true},"container_type_name":1},{"container_id":2,"container_name":"policyList","container_param":{"serverList":true,"help":true,"tabSettings":false,"addWidgets":false,"tab":true,"addTab":false},"container_type_name":3}]';
        $assocData['udata'] = '[{"modname":"modNewPolicy","column":0,"wid":1,"page":"6","order":1,"widget_key":""},{"modname":"modMainConsole","column":0,"wid":2,"page":"1","order":1,"widget_key":""},{"modname":"modPolicyList","column":0,"wid":3,"page":"2","order":1,"widget_key":""}]';
        $assocData['pdata'] = '[{"sqeuenceNumber":1,"pageName":"Page_1","layout":"1","pageNumber":1,"boxWidth":"","autoFit":0,"container_id":2},{"sqeuenceNumber":2,"pageName":"Page_2","layout":"1","pageNumber":2,"boxWidth":"","autoFit":0,"container_id":2},{"sqeuenceNumber":3,"pageName":"Page_3","layout":"1","pageNumber":3,"boxWidth":"","autoFit":0,"container_id":2},{"sqeuenceNumber":4,"pageName":"Page_4","layout":"1","pageNumber":4,"boxWidth":"","autoFit":0,"container_id":2},{"sqeuenceNumber":5,"pageName":"Page_5","layout":"1","pageNumber":5,"boxWidth":"","autoFit":0,"container_id":2},{"sqeuenceNumber":1,"pageName":"Page_6","layout":"1","pageNumber":6,"boxWidth":"","autoFit":0,"container_id":1}]';
        $assocData['lang'] = 'en_US';
        $assocData['theme'] = 'default';
        $this->appendAssocsData($assocData);
        parent::setUp('users', $this->getAssocsData());
    }
    /**
     *\brief Description
     * destroy predefine users data from /path/to/db/sqlite/tmwf_test.db
     */
    public function tearDownUsers(){
        parent::tearDown('users');
    }
    /**
     *\brief Description
     * initial predefine userdata data to /path/to/db/sqlite/tmwf_test.db
     */
    public function setUpUserdata(){
        $assocData['id'] = '1';
        $assocData['uid'] = '1';
        $assocData['wid'] = '1';
        $assocData['modname'] = 'widget_name1';
        $assocData['data'] = '';
        $assocData['pid'] = '1';
        $assocData['widget_key'] = '';
        $assocData['param'] = '';
        $this->appendAssocsData($assocData);
        $assocData['id'] = '2';
        $assocData['uid'] = '1';
        $assocData['wid'] = '2';
        $assocData['modname'] = 'widget_name2';
        $assocData['data'] = '';
        $assocData['pid'] = '1';
        $assocData['widget_key'] = '';
        $assocData['param'] = '';
        $this->appendAssocsData($assocData);
        $assocData['id'] = '7';
        $assocData['uid'] = '1';
        $assocData['wid'] = '3';
        $assocData['modname'] = 'widget_name789';
        $assocData['data'] = '';
        $assocData['pid'] = '1';
        $assocData['widget_key'] = '1';
        $assocData['param'] = '';
        $this->appendAssocsData($assocData);
        $assocData['id'] = '8';
        $assocData['uid'] = '1';
        $assocData['wid'] = '4';
        $assocData['modname'] = 'widget_name789';
        $assocData['data'] = '';
        $assocData['pid'] = '1';
        $assocData['widget_key'] = '2';
        $assocData['param'] = '';
        $this->appendAssocsData($assocData);
        $assocData['id'] = '9';
        $assocData['uid'] = '1';
        $assocData['wid'] = '5';
        $assocData['modname'] = 'widget_name789';
        $assocData['data'] = '';
        $assocData['pid'] = '1';
        $assocData['widget_key'] = '3';
        $assocData['param'] = '';
        $this->appendAssocsData($assocData);
        $assocData['id'] = '10';
        $assocData['uid'] = '1';
        $assocData['wid'] = '5';
        $assocData['modname'] = 'widget_name10';
        $assocData['data'] = '';
        $assocData['pid'] = '999999999';
        $assocData['widget_key'] = '3';
        $assocData['param'] = '';
        $this->appendAssocsData($assocData);
        parent::setUp('userdata', $this->getAssocsData());
    }
    /**
     *\brief Description
     * destroy predefine userdata data from /path/to/db/sqlite/tmwf_test.db
     */
    public function tearDownUserdata(){
        parent::tearDown('userdata');
    }
    /**
     *\brief Description
     * initial predefine serverlist data to /path/to/db/sqlite/tmwf_test.db
     */
    public function setUpServerlist(){
        $assocData['id'] = '1';
        $assocData['owner'] = '0';
        $assocData['deleted'] = '0';
        $assocData['lastcheck'] = '0';
        $assocData['name'] = 'localhost';
        $assocData['hostinfo'] = '{"host":"localhost","type":"modSimple"}';
        $assocData['guid'] = '';
        $this->appendAssocsData($assocData);
        $assocData['id'] = '2';
        $assocData['owner'] = '1';
        $assocData['deleted'] = '0';
        $assocData['lastcheck'] = '0';
        $assocData['name'] = 'http://10.1.1.1';
        $assocData['hostinfo'] = '{"host":"10.1.1.1","port":80,"protocol":"http","username":"root","password":"wBPAsIOGfkKlhft3wVLNNrhCb5pqNKZHgUXEknJA5Ik=","proxy_enable":0,"proxy_id":null,"type":"modSimple","customFields":""}';
        $assocData['guid'] = 'ada88a9e-9111-428e-af44-0ab8a093e536';
        $this->appendAssocsData($assocData);
        parent::setUp('serverlist', $this->getAssocsData());
        $assocData['id'] = '3';
        $assocData['owner'] = '2';
        $assocData['deleted'] = '0';
        $assocData['lastcheck'] = '0';
        $assocData['name'] = 'http://10.1.1.1';
        $assocData['hostinfo'] = '{"host":"10.1.1.1","port":80,"protocol":"http","username":"root","password":"wBPAsIOGfkKlhft3wVLNNrhCb5pqNKZHgUXEknJA5Ik=","proxy_enable":0,"proxy_id":null,"type":"modSimple","customFields":""}';
        $assocData['guid'] = '123aba9e-9111-428e-af44-0ab8a093e53e';
        $this->appendAssocsData($assocData);
        parent::setUp('serverlist', $this->getAssocsData());
    }
    /**
     *\brief Description
     * destroy predefine serverlist data from /path/to/db/sqlite/tmwf_test.db
     */
    public function tearDownServerlist(){
        parent::tearDown('serverlist');
    }
    /**
     *\brief Description
     * initial predefine serverlisttype data to /path/to/db/sqlite/tmwf_test.db
     */
    public function setUpServerlisttype(){
        $assocData['id'] = '1';
        $assocData['type'] = 'modSimple';
        $assocData['passwordonly'] = '0';
        $this->appendAssocsData($assocData);
        $assocData['id'] = '2';
        $assocData['type'] = 'modEndpointEncryption';
        $assocData['passwordonly'] = '0';
        $assocData['customFields'] = '[{"type":"text","caption":"Enterprise:","name":"enterprise","value":"","allowempty":"0","maxlength":"255"}]';
        $this->appendAssocsData($assocData);
        $assocData['id'] = '3';
        $assocData['type'] = 'modOSCE';
        $assocData['passwordonly'] = '0';
        $assocData['customFields'] = '[{"type":"text","caption":"OSCE:","name":"enterprise","value":"","allowempty":"0","maxlength":"255"}]';
        $this->appendAssocsData($assocData);
        parent::setUp('serverlisttype', $this->getAssocsData());
    }
    
    /**
     *\brief Description
     * destroy predefine serverlisttype data from /path/to/db/sqlite/tmwf_test.db
     */
    public function tearDownServerlisttype(){
        parent::tearDown('serverlisttype');
    }
    /**
     *\brief Description
     * initial predefine WIDGET data to /path/to/db/sqlite/tmwf_test.db
     */
    public function setUpWidgetComponent(){
        //echo __FUNCTION__;
        $assocData['wcomponent_id'] = '1';
        $assocData['wcomponent_name'] = 'wcomponent_name1';
        $assocData['wcomponent_version'] = '1.0';
        $assocData['wcomponent_version_float'] = '1.0';
        $assocData['wcomponent_min_support_version'] = '2.0';
        $assocData['wcomponent_min_support_version_float'] = '2.0';
        $assocData['wcomponent_status'] = '1';
        $assocData['wcomponent_status_update'] = '0';
        $assocData['wcomponent_param'] = '';
        $assocData['createtime'] = strtotime('2010-11-02 10:00:00');
        $assocData['edittime'] = strtotime('2010-11-02 10:00:00');
        $this->appendAssocsData($assocData);
        $assocData['wcomponent_id'] = '2';
        $assocData['wcomponent_name'] = 'wcomponent_name2';
        $assocData['wcomponent_version'] = '1.0';
        $assocData['wcomponent_version_float'] = '1.0';
        $assocData['wcomponent_min_support_version'] = '2.0';
        $assocData['wcomponent_min_support_version_float'] = '2.0';
        $assocData['wcomponent_status'] = '1';
        $assocData['wcomponent_status_update'] = '0';
        $assocData['wcomponent_param'] = '';
        $assocData['createtime'] = strtotime('2010-11-02 11:00:00');
        $this->appendAssocsData($assocData);
        // widget status=off
        $assocData['wcomponent_id'] = '3';
        $assocData['wcomponent_name'] = 'wcomponent_name3';
        $assocData['wcomponent_version'] = '1.0';
        $assocData['wcomponent_version_float'] = '1.0';
        $assocData['wcomponent_min_support_version'] = '2.0';
        $assocData['wcomponent_min_support_version_float'] = '2.0';
        $assocData['wcomponent_status'] = '0';
        $assocData['wcomponent_status_update'] = '0';
        $assocData['wcomponent_param'] = '';
        $assocData['createtime'] = strtotime('2010-11-02 11:00:00');
        $assocData['edittime'] = strtotime(date('Y-m-d H:i:s', strtotime('-14 days')));
        $this->appendAssocsData($assocData);
        // wcomponent_id 4,5,6 is reserve for QA test case
        $assocData['wcomponent_id'] = '7';
        $assocData['wcomponent_name'] = 'wcomponent_name' . $assocData['wcomponent_id'];
        $assocData['wcomponent_version'] = '1.0';
        $assocData['wcomponent_version_float'] = '1.0';
        $assocData['wcomponent_min_support_version'] = '2.0';
        $assocData['wcomponent_min_support_version_float'] = '2.0';
        $assocData['wcomponent_status'] = '1';
        $assocData['wcomponent_status_update'] = '0';
        $assocData['wcomponent_param'] = '';
        $assocData['createtime'] = strtotime('2010-11-02 11:00:00');
        $assocData['edittime'] = strtotime(date('Y-m-d H:i:s', strtotime('-13 days')));
        $this->appendAssocsData($assocData);
        $assocData['wcomponent_id'] = '8';
        $assocData['wcomponent_name'] = 'wcomponent_name' . $assocData['wcomponent_id'];
        $assocData['wcomponent_version'] = '1.0';
        $assocData['wcomponent_version_float'] = '1.0';
        $assocData['wcomponent_min_support_version'] = '2.0';
        $assocData['wcomponent_min_support_version_float'] = '2.0';
        $assocData['wcomponent_status'] = '1';
        $assocData['wcomponent_status_update'] = '0';
        $assocData['wcomponent_param'] = '';
        $assocData['createtime'] = strtotime('2010-11-02 11:00:00');
        $assocData['edittime'] = time();
        $this->appendAssocsData($assocData);
        $assocData['wcomponent_id'] = '9';
        $assocData['wcomponent_name'] = 'wcomponent_name' . $assocData['wcomponent_id'];
        $assocData['wcomponent_version'] = '1.0';
        $assocData['wcomponent_version_float'] = '1.0';
        $assocData['wcomponent_min_support_version'] = '2.0';
        $assocData['wcomponent_min_support_version_float'] = '2.0';
        $assocData['wcomponent_status'] = '1';
        $assocData['wcomponent_status_update'] = '0';
        $assocData['wcomponent_param'] = '{"testParam":"valueParam"}';
        $assocData['createtime'] = strtotime('2010-11-02 11:00:00');
        $this->appendAssocsData($assocData);
        parent::setUp('WIDGET_COMPONENT', $this->getAssocsData());
    }
    /**
     *\brief Description
     * destroy predefine WIDGET_COMPONENT data from /path/to/db/sqlite/tmwf_test.db
     */
    public function tearDownWidgetComponent(){
        parent::tearDown('WIDGET_COMPONENT');
    }
    /**
     *\brief Description
     * initial predefine WIDGET_COMPONENT_CATEGORY data to /path/to/db/sqlite/tmwf_test.db by $assocsData
     */
    public function setUpWidgetComponentCategoryByAssocsData($assocsData = null){
        parent::setUp('WIDGET_COMPONENT_CATEGORY', $assocsData);
    }
    /**
     *\brief Description
     * initial predefine WIDGET_COMPONENT_CATEGORY data to /path/to/db/sqlite/tmwf_test.db
     */
    public function setUpWidgetComponentCategory(){
        $assocData['category_id'] = '1';
        $assocData['category_name'] = 'category_name1';
        $assocData['category_product_id'] = '1';
        $assocData['category_proxy'] = 'modOSCE';
        $assocData['createtime'] = strtotime('2010-11-03 01:00:00');
        $this->appendAssocsData($assocData);
        $assocData['category_id'] = '2';
        $assocData['category_name'] = 'category_name2';
        $assocData['category_product_id'] = '1';
        $assocData['category_proxy'] = 'modOSCE';
        $assocData['createtime'] = strtotime('2010-11-03 02:00:00');
        $this->appendAssocsData($assocData);
        $assocData['category_id'] = '3';
        $assocData['category_name'] = 'category_name3';
        $assocData['category_product_id'] = '3';
        $assocData['category_proxy'] = 'modEndpointEncryption';
        $assocData['createtime'] = strtotime('2010-11-03 03:00:00');
        $this->appendAssocsData($assocData);
        // wcomponent_id 3,4 is reserve for QA test case
        parent::setUp('WIDGET_COMPONENT_CATEGORY', $this->getAssocsData());
    }
    /**
     *\brief Description
     * destroy predefine WIDGET_COMPONENT_CATEGORY data from /path/to/db/sqlite/tmwf_test.db
     */
    public function tearDownWidgetComponentCategory(){
        parent::tearDown('WIDGET_COMPONENT_CATEGORY');
    }
    /**
     *\brief Description
     * initial predefine WIDGET_COMPONENT_CATEGORY_MAPPING data to /path/to/db/sqlite/tmwf_test.db by $assocsData
     */
    public function setUpWidgetComponentCategoryMappingByAssocsData($assocsData = null){
        parent::setUp('WIDGET_COMPONENT_CATEGORY_MAPPING', $assocsData);
    }
    /**
     *\brief Description
     * initial predefine WIDGET_COMPONENT_CATEGORY_MAPPING data to /path/to/db/sqlite/tmwf_test.db
     */
    public function setUpWidgetComponentCategoryMapping(){
        //echo __FUNCTION__;
        $assocData['mapping_id'] = '1';
        $assocData['wcomponent_id'] = '1';
        $assocData['category_id'] = '1';
        $assocData['min_support_version'] = '1.0';
        $assocData['min_support_version_float'] = '1.0';
        $assocData['createtime'] = strtotime('2010-11-03 01:00:00');
        $this->appendAssocsData($assocData);
        $assocData['mapping_id'] = '2';
        $assocData['wcomponent_id'] = '1';
        $assocData['category_id'] = '2';
        $assocData['min_support_version'] = '1.5';
        $assocData['min_support_version_float'] = '1.5';
        $assocData['createtime'] = strtotime('2010-11-03 01:00:00');
        $this->appendAssocsData($assocData);
        $assocData['mapping_id'] = '3';
        $assocData['wcomponent_id'] = '2';
        $assocData['category_id'] = '1';
        $assocData['min_support_version'] = '1.0';
        $assocData['min_support_version_float'] = '1.0';
        $assocData['createtime'] = strtotime('2010-11-03 02:00:00');
        $this->appendAssocsData($assocData);
        // widget status=off
        $assocData['mapping_id'] = '4';
        $assocData['wcomponent_id'] = '3';
        $assocData['category_id'] = '1';
        $assocData['min_support_version'] = '1.0';
        $assocData['min_support_version_float'] = '1.0';
        $assocData['createtime'] = strtotime('2010-11-03 02:00:00');
        $this->appendAssocsData($assocData);
        // wcomponent_id 5,6,7 is reserve for QA test case
        parent::setUp('WIDGET_COMPONENT_CATEGORY_MAPPING', $this->getAssocsData());
    }
    /**
     *\brief Description
     * destroy predefine WIDGET_COMPONENT_CATEGORY_MAPPING data from /path/to/db/sqlite/tmwf_test.db
     */
    public function tearDownWidgetComponentCategoryMapping(){
        parent::tearDown('WIDGET_COMPONENT_CATEGORY_MAPPING');
    }
    /**
     *\brief Description
     * initial predefine CONTAINER data to /path/to/db/sqlite/tmwf_test.db by $assocsData
     */
    public function setUpContainerByAssocsData($assocsData = null){
        parent::setUp('CONTAINER', $assocsData);
    }
    /**
     *\brief Description
     * initial predefine CONTAINER data to /path/to/db/sqlite/tmwf_test.db
     */
    public function setUpContainer(){
        $assocData['container_name'] = '1';
        $assocData['container_name'] = 'container_name1';
        $assocData['container_param'] = '{"serverList":false,"help":false,"tabSettings":false,"addWidgets":false,"tab":false,"addTab":false}';
        $assocData['container_type_name'] = '1';
        $this->appendAssocsData($assocData);
        parent::setUp('CONTAINER', $this->getAssocsData());
    }
    
    /**
     *\brief Description
     * destroy predefine CONTAINER data from /path/to/db/sqlite/tmwf_test.db
     */
    public function tearDownContainer(){
        parent::tearDown('CONTAINER');
    }
}
